import urllib.request

url = 'http://www.baidu.com'


# 一个类型 client.HTTPResponse
response = urllib.request.urlopen(url)

# content = response.read()
# content = response.read(5)
# content = response.readline()
# content = response.readlines()

# 响应状态码
# status = response.getcode()
# print(status)

# 返回url地址
# print(response.geturl())

# 获取响应状态信息
# print(response.getheaders())